const api = require('../utils/request.js')

import {request} from '../utils/request'

  module.exports = {
    // 获取商品列表
  goodsList(data) {
    return api.request({
      url: '/wechat/goods/list',
      method: 'GET',
      data
    })
  },
  //营地营位添加
  addGoods(data) {
    return api.request({
      url: '/wechat/goods',
      method: 'post',
      data
    })
  },
  
  // 删除营地
  deleteGoods(goodsid) {
    return api.request({
      url: `/wechat/goods/${goodsid}`,
      method: 'delete'
    })
  },

  //生成二维码
  qrCode(data) {
    return api.request({
      url: '/wechat/goods/download-qr-code',
      method: 'GET',
      data
    })
  },
  //新增订单
  addOrder(orderData){
    return api.request({
      url:'/wechat/order',
      method:'post',
      data:orderData
    })
  },
  //更新订单
  
  putOrder(orderData){
    return api.request({
      url: '/wechat/order',
      method:'put',
      data:{
        orderid:orderData.orderId,
        qrCode:orderData.qrCode}
    })
  },
  //查询订单
  orderList(data) {
    return api.request({
      url: '/wechat/order/list',
      method: 'GET',
      data
    })
  },
  //查询订单
  orderDetailList(orderid) {
    return api.request({
      url: '/wechat/order/?'+orderid,
      method: 'GET',
    })
  },
  
  


  }
